<template>
    <Panel :title="title" :class="$style.panel">
        <section :class="$style.content">
            <div :class="$style.item" v-for="item in financeItems" :key="item.url">
                <img :src="item.url" alt="">
                <div>
                    <h4>{{item.title}}</h4>
                    <p :class="item.color?null:$style.p1">{{item.tip}}</p>
                </div>
                <em>{{item.link}} ></em>
            </div>
        </section>
    </Panel>
</template>

<script>
    import Panel from '../core/panel'
    export default {
        props: {
            title: {
                type: String,
                default: ''
            },
            financeItems: {
                type: Array,
                default () {
                    return []
                }
            },
        },
        data() {
            return {}
        },
        components: {
            Panel
        }
    }
</script>

<style lang="scss" module>
    @import '~@/assets/css/element.scss';

    .panel {
        @include panel;

        .content {
            @include flex;

            .item {
                @include flex(row);
                align-items: center;
                height: 140px;
                justify-content: space-around;

                &:after {
                    content: " ";
                    box-sizing: border-box;
                    height: 0;
                    width: 100%;
                    border-bottom: 1px solid #ddd;
                    margin-left: 150px;
                }

                &:last-child:after {
                    border-color: #fff;
                }

                >img {
                    width: 88px;
                    height: 88px;
                    display: inline-block;
                    margin: 0 32px;
                }

                >div {
                    font-size: 32px;
                    color: #333;
                    line-height: 1.8;
                    width: 344px;

                    p {
                        color: #ff3232;
                        font-size: 24px;
                        line-height: 1.1;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }

                    .p1 {
                        color: #999;
                    }
                }

                >em {
                    color: #FF801A;
                    font-size: 28px;
                }
            }
        }
    }
</style>